using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Appr;
using net_work.Data.VO.Appr;

namespace net_work.IService.Appr;

public interface IApprovalService
{
    /// <summary>
    /// 开始审批
    /// </summary>
    /// <param name="approvalInstanceAddRequest">请求参数</param>
    /// <returns>是否成功</returns>
    Task<int> Start(ApprovalInstanceAddRequest approvalInstanceAddRequest);

    /// <summary>
    /// 获取审批流程带历史记录列表
    /// </summary>
    /// <param name="pagedRequest">分页请求参数</param>
    /// <returns>审批列表</returns>
    Task<PagedResult<ApprovalInstanceWithHistoryResult>> GetListWithHistory(PagedRequest pagedRequest);

    /// <summary>
    /// 获取待办列表
    /// </summary>
    /// <param name="pagedRequest">分页请求参数</param>
    /// <returns>待办列表</returns>
    Task<PagedResult<ApprovalInstanceToDoResult>> GetToDoList(PagedRequest pagedRequest);

    /// <summary>
    /// 提交审批
    /// </summary>
    /// <param name="approvalSubmit">请求参数</param>
    /// <returns>是否成功</returns>
    Task<int> Submit(ApprovalSubmit approvalSubmit);
}